<?php

namespace App\Library;

use App\Models\Shop;
use App\Models\ShopAudit;

/**
 * 检查是否存在.
 */
class CheckExists
{
    /**
     * 检查商铺名是否存在.
     */
    public static function CheckShopName($name)
    {
        $shop = Shop::where('shop_name', $name)->first();
        if ($shop) {
            return true;
        }
        $shopAudit = ShopAudit::where('shop_name', $name)->first();
        if ($shopAudit) {
            return true;
        }

        return false;
    }
}
